-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP feat: initial r/profile dapp #181
Conversation
d78eed8
to
a8d63fa
Compare
370b2ef
to
fc1713d
Compare
6109e2b
to
fe6690d
Compare
0c86475
to
205ea11
Compare
Signed-off-by: Manfred Touron <94029+moul@users.noreply.github.com>
Signed-off-by: Manfred Touron <94029+moul@users.noreply.github.com>
Signed-off-by: Manfred Touron <94029+moul@users.noreply.github.com>
Signed-off-by: Manfred Touron <94029+moul@users.noreply.github.com>
205ea11
to
7dd0047
Compare
Are you still interested in working on this? Shall we keep it open? @moul |
Yes, I will continue. |
|
||
// TODO: makes sense to implement an allowance system? | ||
|
||
var profiles *avl.MutTree // std.Address.String() -> *Profile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using the old avl API
Quick update: -> https://medium.com/@matryer/context-keys-in-go-5312346a868d |
ping @gnolang/24-zone01-1 |
Following this [PR](gnolang#181 (comment)) concerning the creation of a realm `profile` I created this realm which allows the creation of profile as well as the associated functions to display the information of a profile with an address or a username. I have some questions concerning this realm: - Currently, if a user modifies his username, his old username is not freed and is therefore no longer available, even if it is no longer in use. Should I free the old username when the user has changed username? - To make it possible to search by username and address, I've created a second avl tree containing both username and address, so that I can find the profile indexed by its address by searching for it by its username. This is the most efficient solution I've found. I'd like to get some feedback on this and know if I should do things differently so that searching by username is more optimized. - Do you have any other suggestions for completing the profile fields, or other interesting features to add? Thanks in advance for your feedback <details><summary>Contributors' checklist...</summary> - [ ] Added new tests, or not needed, or not feasible - [ ] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [ ] Updated the official documentation or not needed - [ ] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [ ] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details> Closes gnolang#181 --------- Co-authored-by: kazai <kazai@777> Co-authored-by: Manfred Touron <94029+moul@users.noreply.github.com> Co-authored-by: Leon Hudak <33522493+leohhhn@users.noreply.github.com>
This PR intends to let users define custom metadata that can be reused across
the whole ecosystem.
This realm is intended to be used by people that owns a r/user entry or
not (works well with just an
std.Address
).This is a preliminary realm for bigger projects that would to rely on Gno,
including a twitter clone, or maybe an ENS that could store IP addresses, etc.
The goal is to pack the contract with default fields that are the expected most common ones for customization (profile_picture, name, primary_color, is_dev (to enable more debug), etc. But the contract should support a way to set new fields, basically a key/value store associated with a profile.
Exected usage API from another contract:
Depends on #145
Depends on #149